Allow examples to be library
This PR allows to specify **crate-type** to an example in **Cargo.toml**.
After this PR an example's **crate-type** can be:
* lib
* rlib
* dylib
* proc-macro
Please look at src/cargo/core/manifest.rs:116 because I am not sure whether I done it right.
I haven't added any tests.
I'd like to add them if someone says me how to do that.
Fixes #2358.